﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Atendex.Dominio.Interfaces;
using Atendex.Dominio.ActiveRecord;
using Castle.ActiveRecord;

namespace Atendex.Infraestrutura.Repositórios
{
    public class RepositorioCurso : RepositorioGenerico<ICurso>
    {
        protected override Type ImpType
        {
            get { return typeof(CursoAR); }
        }

        public override ICurso TentaObterPorId(object id)
        {
            return ActiveRecordBase<CursoAR>.TryFind(id);
        }

        public override ICurso[] ObtemTodosNaoAtivos()
        {
            return ActiveRecordBase<CursoAR>.FindAll();
        }
    }
}
